package com.Web;


import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import util.StringUtil;


import com.entity.Goal;
import com.entity.employProject;

import com.service.GoalService;


public class goal extends HttpServlet {

	private static final long serialVersionUID = 1L;

	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		 String po = request.getParameter("m");
         
		 if(StringUtil.isEmpty(po)) {

        	 	HttpSession session = request.getSession();
        	 	employProject ep = (employProject) session.getAttribute("ep");
        	 	
        	 	GoalService service = new GoalService();
		         List<Goal> goalList = service.findByProjectId(ep.getProjectid());
		         
		         session.setAttribute("goalList", goalList);
		        
		         request.getRequestDispatcher("/WEB-INF/views/goal.jsp").forward(request, response);
         }
	}
	
}
